import request from '@/utils/request'

// 查询采购退款单列表
export function listPrefund(query) {
  return request({
    url: '/crm/prefund/list',
    method: 'get',
    params: query
  })
}

// 查询采购退款单详细
export function getPrefund(id) {
  return request({
    url: '/crm/prefund/' + id,
    method: 'get'
  })
}

// 新增采购退款单
export function addPrefund(data) {
  return request({
    url: '/crm/prefund',
    method: 'post',
    data: data
  })
}

// 修改采购退款单
export function updatePrefund(data) {
  return request({
    url: '/crm/prefund',
    method: 'put',
    data: data
  })
}

// 删除采购退款单
export function delPrefund(id) {
  return request({
    url: '/crm/prefund/' + id,
    method: 'delete'
  })
}
